Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for number keys to select type of block to be placed #340

Merged
merged 2 commits into from
Jan 10, 2024
Merged

Allow for number keys to select type of block to be placed #340

merged 2 commits into from
Jan 10, 2024

Conversation

jhuang97
Copy link
Contributor

@jhuang97 jhuang97 commented Jan 9, 2024

The ten materials that can be selected can be edited by changing the field material_palette in client/src/sim.rs.

The change in common/src/character_controller/mod.rs was necessary for the server not to crash when running on my machine.

As of now, the number keys map to the following materials:
1: Wood Planks
2: Grass
3: Dirt
4: Sand
5: Snow
6: White Brick
7: Grey Brick
8: Basalt
9: Water
0: Lava

Copy link
Owner

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks like a nice straightforward improvement!

client/src/graphics/window.rs Outdated Show resolved Hide resolved
client/src/sim.rs Outdated Show resolved Hide resolved
client/src/sim.rs Outdated Show resolved Hide resolved
common/src/character_controller/mod.rs Outdated Show resolved Hide resolved
@jhuang97
Copy link
Contributor Author

thanks for all the comments! I made changes for all of them and also ran cargo fmt locally.

Copy link
Owner

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Ralith Ralith merged commit a3046cc into Ralith:master Jan 10, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants